/** ***********************************************
 * CodeGen
 *
 * @author  Jonnie Spratley
 * @date 3/05/2009
 * @licence MCIYC
 * @website http://jonniespratley.com/code
 * @contact jonniespratley@gmail.com
 *********************************************** */
package com.jonniespratley.codegen.events
{
	/**
	 * Cairngorm provides a singleton Cairngorm Event Dispatcher that works with the Front Controller class.
	 * Whenever you want to dispatch Cairngorm events, you use the Cairngorm Event Dispatcher.
	 *
	 * The following code shows how to broadcast a Cairngorm event using
	 * the Cairngorm Event Dispatcher:
	 *
	 * <code>
	 *	var evt:YourEvent = new YourEvent( YourEvent.NAME_OF_EVENT );
	 *		evt.dispatchEvent();
	 *</code>
	 *
	 * The dispatchEvent() method of the Cairngorm Event Dispatcher singleton takes a parameter of
	 * type flash.events.Event. This event is dispatched and the corresponding command is executed.
	 *
	 * This is how the Front Controller, Cairngorm Event Dispatcher, Command patterns, and
	 * Cairngorm Events work together with the Cairngorm Event, the Model Locator, and VO
	 * patterns to create an immersive experience for the user of an RIA.
	 *
	 */
	import com.adobe.cairngorm.control.CairngormEvent;
	import com.jonniespratley.codegen.vo.ConfigVO;

	import flash.events.Event;

	public final class GenerateConfigEvent extends CairngormEvent
	{
		public static const GENERATE_CONFIG_EVENT:String = "GENERATE_CONFIG_EVENT";

		/* public var aHost:String;
		public var aUser:String;
		public var aPass:String;
		public var aDatabase:String;
		public var aApplication:String;
		public var aNamespace:String;
		public var aEndpoint:String; */
		public var aConfig:ConfigVO;

		public function GenerateConfigEvent( aConfig:ConfigVO/* aHost:String, aUser:String, aPass:String, aDatabase:String, aApplication:String, aNamespace:String, aEndpoint:String */ )
		{
			super( GENERATE_CONFIG_EVENT );
		/* 	this.aHost = aHost;
			this.aPass = aPass;
			this.aUser = aUser;
			this.aDatabase = aDatabase;
			this.aApplication = aApplication;
			this.aNamespace = aNamespace;
			this.aEndpoint = aEndpoint; */
			this.aConfig = aConfig;
		}

		override public function clone():Event
		{
			return new GenerateConfigEvent( aConfig /* aHost, aUser, aPass, aDatabase, aApplication, aNamespace, aEndpoint */ );

		}
	}
}